<div>
    <div class="head">
        <h2 id="metrics-page-heading" class="d-inline-block">Application Metrics</h2>
        <jhi-route-selector class="float-right refresh-left-side"></jhi-route-selector>
    </div>

    <h3>JVM Metrics</h3>

    <div class="row" *ngIf="metrics && !updatingMetrics">
        <jhi-jvm-memory
            class="col-md-4"
            [updating]="updatingMetrics"
            [jvmMemoryMetrics]="metrics.jvm">
        </jhi-jvm-memory>

        <jhi-jvm-threads
            class="col-md-4"
            [threadData]="threads">
        </jhi-jvm-threads>

        <jhi-metrics-system
            class="col-md-4"
            [updating]="updatingMetrics"
            [systemMetrics]="metrics.processMetrics">
        </jhi-metrics-system>
    </div>

    <div *ngIf="metrics && metricsKeyExists('garbageCollector')">
        <h3>Garbage collector statistics</h3>

        <jhi-metrics-garbagecollector
            [updating]="updatingMetrics"
            [garbageCollectorMetrics]="metrics.garbageCollector">
        </jhi-metrics-garbagecollector>
    </div>

    <div class="well well-lg" *ngIf="updatingMetrics">Updating...</div>

    <jhi-metrics-request
        *ngIf="metrics && metricsKeyExists('http.server.requests')"
        [updating]="updatingMetrics"
        [requestMetrics]="metrics['http.server.requests']">
    </jhi-metrics-request>

    <jhi-metrics-endpoints-requests
        *ngIf="metrics && metricsKeyExists('services')"
        [updating]="updatingMetrics"
        [endpointsRequestsMetrics]="metrics.services">
    </jhi-metrics-endpoints-requests>

    <jhi-metrics-cache
        *ngIf="metrics && metricsKeyExists('cache')"
        [updating]="updatingMetrics"
        [cacheMetrics]="metrics.cache">
    </jhi-metrics-cache>

    <jhi-metrics-datasource
        *ngIf="metrics && metricsKeyExistsAndObjectNotEmpty('databases')"
        [updating]="updatingMetrics"
        [datasourceMetrics]="metrics.databases">
    </jhi-metrics-datasource>
</div>
